/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Beans;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "simples_nacional_detalhe")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "SimplesNacionalDetalhe.findAll", query = "SELECT s FROM SimplesNacionalDetalhe s")})
public class SimplesNacionalDetalhe implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer id;
    private Integer faixa;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "VALOR_INICIAL", precision = 18, scale = 6)
    private BigDecimal valorInicial;
    @Column(name = "VALOR_FINAL", precision = 18, scale = 6)
    private BigDecimal valorFinal;
    @Column(precision = 18, scale = 6)
    private BigDecimal aliquota;
    @Column(precision = 18, scale = 6)
    private BigDecimal irpj;
    @Column(precision = 18, scale = 6)
    private BigDecimal csll;
    @Column(precision = 18, scale = 6)
    private BigDecimal cofins;
    @Column(name = "PIS_PASEP", precision = 18, scale = 6)
    private BigDecimal pisPasep;
    @Column(precision = 18, scale = 6)
    private BigDecimal cpp;
    @Column(precision = 18, scale = 6)
    private BigDecimal icms;
    @Column(precision = 18, scale = 6)
    private BigDecimal ipi;
    @Column(precision = 18, scale = 6)
    private BigDecimal iss;
    @JoinColumn(name = "ID_SIMPLES_NACIONAL_CABECALHO", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private SimplesNacionalCabecalho idSimplesNacionalCabecalho;

    public SimplesNacionalDetalhe() {
    }

    public SimplesNacionalDetalhe(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getFaixa() {
        return faixa;
    }

    public void setFaixa(Integer faixa) {
        this.faixa = faixa;
    }

    public BigDecimal getValorInicial() {
        return valorInicial;
    }

    public void setValorInicial(BigDecimal valorInicial) {
        this.valorInicial = valorInicial;
    }

    public BigDecimal getValorFinal() {
        return valorFinal;
    }

    public void setValorFinal(BigDecimal valorFinal) {
        this.valorFinal = valorFinal;
    }

    public BigDecimal getAliquota() {
        return aliquota;
    }

    public void setAliquota(BigDecimal aliquota) {
        this.aliquota = aliquota;
    }

    public BigDecimal getIrpj() {
        return irpj;
    }

    public void setIrpj(BigDecimal irpj) {
        this.irpj = irpj;
    }

    public BigDecimal getCsll() {
        return csll;
    }

    public void setCsll(BigDecimal csll) {
        this.csll = csll;
    }

    public BigDecimal getCofins() {
        return cofins;
    }

    public void setCofins(BigDecimal cofins) {
        this.cofins = cofins;
    }

    public BigDecimal getPisPasep() {
        return pisPasep;
    }

    public void setPisPasep(BigDecimal pisPasep) {
        this.pisPasep = pisPasep;
    }

    public BigDecimal getCpp() {
        return cpp;
    }

    public void setCpp(BigDecimal cpp) {
        this.cpp = cpp;
    }

    public BigDecimal getIcms() {
        return icms;
    }

    public void setIcms(BigDecimal icms) {
        this.icms = icms;
    }

    public BigDecimal getIpi() {
        return ipi;
    }

    public void setIpi(BigDecimal ipi) {
        this.ipi = ipi;
    }

    public BigDecimal getIss() {
        return iss;
    }

    public void setIss(BigDecimal iss) {
        this.iss = iss;
    }

    public SimplesNacionalCabecalho getIdSimplesNacionalCabecalho() {
        return idSimplesNacionalCabecalho;
    }

    public void setIdSimplesNacionalCabecalho(SimplesNacionalCabecalho idSimplesNacionalCabecalho) {
        this.idSimplesNacionalCabecalho = idSimplesNacionalCabecalho;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SimplesNacionalDetalhe)) {
            return false;
        }
        SimplesNacionalDetalhe other = (SimplesNacionalDetalhe) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bs.Beans.SimplesNacionalDetalhe[ id=" + id + " ]";
    }
    
}
